<%
Server.ScriptTimeOut=9999
Dim conn,db,connstr,Stime,Uploadfilepath,APage,Master,lang,Domain,UpPath,CustomInterface,dbpath,iconpath,iconext
URL=Request.ServerVariables("HTTP_REFERER")
Domain="domain.com"
Stime=Timer()
set conn = Server.CreateObject("ADODB.connection") '创建服务器ADODB对象
connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
conn.open connstr '连接数据库
USID="US"&cstr(Server.MapPath(db))
ULVL="UL"&cstr(Server.MapPath(db))
Function closedatabase() '关闭数据库调用
conn.close
set conn = nothing
End function

dim rs,rs2,rs3,sql,sql2
set rs=Server.CreateObject("ADODB.Recordset")
set rs2=Server.CreateObject("ADODB.Recordset")
set rs3=Server.CreateObject("ADODB.Recordset")



Function CheckAdmin()
	'管理员身份验证,
	CheckAdmin=False
	Sql="Select * from admin"
	rs3.open sql,conn,1,1
		for i=1 to rs3.recordcount
			if Session(USID)=rs3("admin_name") then 
				CheckAdmin=True
				rs3.close
				exit function
			end if
		rs3.movenext
		next
	rs3.close
	CheckAdmin=False
End Function

Sub CheckAdmin2()
	'管理员身份验证,
	Dim CheckPass
	CheckPass=False
	Sql="Select * from admin"
	rs.open sql,conn,1,1
		for i=1 to rs.recordcount
			if Session(USID)=rs("admin_name") then 
				CheckPass=True
				rs.close
				exit Sub
			end if
		rs.movenext
		next
	rs.close
	if CheckPass=False then '失败则转到此页
	Response.Redirect "default.asp"
	Response.End
	end if
End Sub

	sql="select * from guild"
	On Error Resume Next
	rs.open sql,conn,1,1
		ArrGuildPara=split(rs("Guild_para"),"|")
		GuildName=rs("Guild_Name")
		GuildsName=rs("Guild_sName")
		GuildServer=rs("guild_server")
		StylePath="style"
		StylePath=rs("Guild_style")
		IconPath=ArrGuildPara(1)
		IconExt=ArrGuildPara(2)
		Precision=ArrGuildPara(3)
		lvlGBook=ArrGuildPara(4)
	rs.close
	On Error GoTo 0
%>